
function add(date, time1, time2, course, place, description) {
    nav.initializeTask(0, 2, "正在签到....")
    nav.openTask("签到")
    http.post("/sign.json", {}, {
                       member: {id:usinfo.id, display: usinfo.name},
                       date: date,
                       tm1: time1,
                       tm2: time2,
                       place:  {id:place.id, display: place.name},
                       course: {id:course.id, display: course.name},
                       description: description
                   }, function(json) {
                       nav.value = nav.maximumValue

                       if (json.error){
                           dialog.message(json.error.description)
                       }
                       else {
                           dialog.toast("添加成功")
                           xmlModel.reload()
                       }
                   }
                   )
}
